import React from 'react'
import ReactDOM from 'react-dom/client'
import {createBrowserRouter, RouterProvider} from "react-router-dom";
import 'bootstrap/dist/css/bootstrap.css'
import 'bootstrap/dist/js/bootstrap.bundle.js'
import './styles/modules/login.module.css'
import './styles/main.css'
import './styles/theme/theme.light.css'
import RegisterPage from "./pages/RegisterPage.tsx";
import LibraryPage from "./pages/LibraryPage.tsx";
import LoginPage from "./pages/LoginPage.tsx";
import ProductsDetailsPage from "./pages/ProductsDetailsPage.tsx";
import HomePage from "./pages/HomePage.tsx";
import ArticlePage from "./pages/ArticlePage.tsx";
import ManagementPage from "./pages/ConsolePage.tsx";
import ProfilePage from "./pages/ProfilePage.tsx";
import CartPage from "./pages/CartPage.tsx";
import Test from "./pages/Test.tsx";
import OrderDetailsPage from "./pages/OrderDetailsPage.tsx";


const router = createBrowserRouter([
    {
        path: '/login',
        element: <LoginPage/>,
        errorElement: <div>404 Not Found</div>

    },
    {
        path: '/',
        element: <HomePage/>,

    },
    {
        path: '/register',
        element: <RegisterPage/>
    },
    {
        path: '/library',
        element: <LibraryPage/>
    },
    {
        path: '/details',
        element: <ProductsDetailsPage/>
    },
    {
        path: '/home',

        element: <HomePage/>
    },
    {
        path: '/article',
        element: <ArticlePage/>

    },
    {
        path: '/console',
        element: <ManagementPage/>

    },
    {
        path: '/profile',
        element: <ProfilePage/>

    },

    {
        path: '/cart',
        element: <CartPage/>

    },
    {
        path: '/orderDetails',
        element: <OrderDetailsPage/>

    }
])

ReactDOM.createRoot(document.getElementById('root')!).render(
    <React.StrictMode>
        <RouterProvider router={router}/>
    </React.StrictMode>,
)
